<template>
    <div class="home content">
        <nav style="padding-top: 35px;">
            <el-row class="tac">
                <el-col>
                    <el-menu class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" router :default-active="$route.path">

                        <el-menu-item index="/adminaccountlist">
                            <i class="el-icon-edit"></i>
                            <span slot="title">账号管理</span>
                        </el-menu-item>

                        <el-menu-item index="/companys">
                            <i class="el-icon-share"></i>
                            <span slot="title">中介公司管理</span>
                        </el-menu-item>

                        <el-menu-item index="/type">
                            <i class="el-icon-menu"></i>
                            <span slot="title">分类管理</span>
                        </el-menu-item>

                        <el-menu-item index="/leveltype">
                            <i class="el-icon-menu"></i>
                            <span slot="title">三级分类管理</span>
                        </el-menu-item>

                        <el-menu-item index="/articlelist">
                            <i class="el-icon-edit"></i>
                            <span slot="title">文章管理</span>
                        </el-menu-item>

                        <el-menu-item index="/module">
                            <i class="el-icon-printer"></i>
                            <span slot="title">权限管理--模块</span>
                        </el-menu-item>

                        <el-menu-item index="/authority">
                            <i class="el-icon-setting"></i>
                            <span slot="title">权限管理--权限</span>
                        </el-menu-item>

                    </el-menu>

                </el-col>
            </el-row>
        </nav>
        <div class="view-content">
            <router-view></router-view>
        </div>
    </div>
    
</template>
<script>
    import "../style/homes.css";

    export default {
        name:"homes",     
        methods: {
            handleOpen(key, keyPath) {
                console.log(key, keyPath);
                // console.log('------------handleOpen------------',$route.path);
            },
            handleClose(key, keyPath) {
                console.log(key, keyPath);
                // console.log('------------handleClose------------',$route.path);
            }
        },
        mounted (){
            this.$nextTick(function(){
                // console.log('------------mounted------------',$route.path);
            })
        }
    }
</script>
